
<div class="pageContent">
    <!-- 	      <form id="myform" action="{:U('Money/cmoneyauth')}" method="post"  onsubmit="return validateCallback(this,dialogAjaxDone);"> --><!--       	<table cellpadding=0 cellspacing=0 class="table_form" width="100%"> --><!--   		<tr> --><!-- 			<td>增加预付款：</td> --><!-- 			<td><input type="text" class="input-text"  name="amount" value="0" >填写负数为减少</td> --><!-- 		</tr> --><!--         <tr> --><!-- 			<td>增加赠送帐户：</td> --><!-- 			<td><input type="text" class="input-text"  name="give" value="0" >填写负数为减少</td> --><!-- 		</tr> --><!-- 		</table> --><!-- 		<div class="btn"> --><!-- 		<input type="hidden" name="id" value="{$vo['id']}" /> --><!-- 		<input type="hidden" name="forward" value="{$_SERVER['HTTP_REFERER']}" /> --><!-- 		<INPUT TYPE="submit"  value="{:L('提交')}" class="button" > --><!-- 		<input TYPE="reset"  value="{:L('取消')}" class="button"> --><!-- 		</div> --><!--       </form> -->
    <form id="myform" action="{:U('Refund/save')}" method="post" onsubmit="return validateCallback(this,dialogAjaxDone);">
        <input type='hidden' name='data[id]' value='{$info.id}' />
        <input type='hidden' name='key' value="{$inf.key}" />
		<div class="pageFormContent nowrap" layoutH="97">
            <dl>
                <dt>
                    退款用户：
                </dt>
                <dd>
                	<input id="inputBrand1" name="user.id" value="{$inf['userid']}{$info.userid}" type="hidden"/><input class="required autoinput" name="user.username" value="{$info.username}{$inf['username']}" type="text" postField="keywords" suggestFields="id,username" suggestUrl="{:U('User/suggest',array('tn'=>'user','fn'=>'id,username','field'=>'id,username','where'=>myencode(array('status'=>1),1)))}" lookupGroup="user"/>                 
                </dd>
            </dl>
            <dl>
                <dt>
                    退款类型：
                </dt>
                <dd>
                    <select name='data[refundtype]' class='required'>
                    	<option value=''>请选择</option>
						<volist name='refundtype' id='rt'>
						<option value='{$rt.value}' {if $info['refundtype'] == $rt['value']} selected='selected' {/if}>{$rt.title}</option>
						</volist>
                    </select>
                </dd>
            </dl>
            <dl>
                <dt>
                    金额类型：
                </dt>
                <dd>
                    <select name='data[moneytype]' class='required'>
                    	<option value=''>请选择</option>
                    	<option value='BV' {if $info['moneytype'] == 'BV'}selected='selected'{/if}>BV</option>
						<option value='CV' {if $info['moneytype'] == 'CV'}selected='selected'{/if}>CV</option>
						<option value='PV' {if $info['moneytype'] == 'PV'}selected='selected'{/if}>PV</option>
						<option value='MV' {if $info['moneytype'] == 'MV'}selected='selected'{/if}>MV</option>
                    </select>
                </dd>
            </dl>
            <dl>
                <dt>
                    数值：
                </dt>
                <dd>
                    <input type="text"  alt="标题" name="data[money]" style='width:300px;' value="{if $inf['price']}{$inf['price']/100}{else}{$info['money']/100}{/if}"  class='required' />
                </dd>
            </dl>
            <dl>
                <dt>
                    退款说明：
                </dt>
                <dd>
                	<textarea name='data[remark]' class='required'>{$info.remark}{$inf['sn']}</textarea>
                 </dd>
            </dl>
			<dl>
                <dt>
                   订单ID：
                </dt>
                <dd>
                	<input name="orderid" value="{$inf['orderid']}" type="text"/>
                </dd>
            </dl>
            <dl>
                <dt>
                    附件：
                </dt>
                <dd>
                	<input name="data[file]" id="upimage" value="{$info.file}" type="text"/><span class="info"><input id="upimagebnt" type="file"/>
                </dd>
            </dl>
        </div>
        <div class="formBar">
            <ul>
                <li>
                    <div class="buttonActive">
                        <div class="buttonContent">
                            <button type="submit">
                                保存
                            </button>
                        </div>
                    </div>
                </li>
                <li>
                    <div class="button">
                        <div class="buttonContent">
                            <button type="button" class="close">
                                取消
                            </button>
                        </div>
                    </div>
                </li>
            </ul>
        </div>
    </form>
</div>
<script>
	$(function(){
		$("#upimagebnt").uploadify({
                                                			'swf'         	:'__PUBLIC__/dwz146/uploadify/scripts/uploadify.swf',
                                                			'uploader'    	:'{:U("Refund/file_upload")}',
                                                			'auto'        	:true,
                                                			'formData'     	: {
                                                				'sess_id' : '<?php echo session_id();?>',
                                                			},
                                                			'fileTypeExts'  :'*.gif; *.jpg; *.png; *.jpeg',
                                                			'fileSizeLimit' :'300KB',//上传文件的大小限制，单位为B, KB, MB, 或 GB
                                                			'successTimeout':30,
                                                			//'buttonClass':'uploadButton',
                                                			'buttonText':'上传文件',
                                                			'multi'         :false,//单文件上传
                                            				'width'    : 60,
                                            				'height': 18,
                                                			'onUploadSuccess':function(file, data, response){
                                                				$("#upimage").val(data);
                												$("#main_img").attr("src",data);
                                                				//html=' <a target="_blank" href="'+data+'">查看</a>';
                                                				//$('#upimagedd').append(html);
                                                	        },
                                                	        'onUploadError':function(file, data, response){
                                                				alert(data+'上传失败，请重试');
                                                	        }
                                                		});
	});
</script>